package com.emmmya.ocs.modules.system.file.service;

import com.emmmya.ocs.common.base.BaseService;
import com.emmmya.ocs.modules.system.file.entity.File;
import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface FileService extends BaseService<File,Long> {

    File storeFile(MultipartFile file, String fKey, Long dirId);

    Resource loadFileAsResource(String fileName);

    File findByFKey(String fKey);

    List<File> getAllFileList();


    List<File> findByDirId(Long dirId);

    void deleteAll(Long id);

    File infoFile(String fileName,String filePath,Long dirId) throws Exception;
}